package com.xiaoxi.open.common.util;

import com.xiaoxi.open.common.constant.CommonConstant;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;

import java.util.UUID;

/**
 * @author xiaoxi
 * @version 1.0
 * @date 2022/7/28 14:36
 */
@Slf4j
public class UUIDUtils {

    public static String buildUUIDWithoutHyphen() {
        return UUID.randomUUID().toString().replaceAll(CommonConstant.CROSS_BAR, StringUtils.EMPTY);
    }

    public static String buildUUID() {
        return UUID.randomUUID().toString();
    }
}
